package com.sun.mail.util;

import java.io.FilterInputStream;
import java.io.InputStream;

public class LineInputStream extends FilterInputStream {
    private char[] lineBuffer = null;

    public LineInputStream(InputStream in) {
        super(in);
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public java.lang.String readLine() throws java.io.IOException {
        /*
        r13 = this;
        r12 = 13;
        r11 = 10;
        r10 = -1;
        r9 = 0;
        r3 = r13.in;
        r0 = r13.lineBuffer;
        if (r0 != 0) goto L_0x0012;
    L_0x000c:
        r8 = 128; // 0x80 float:1.794E-43 double:6.32E-322;
        r0 = new char[r8];
        r13.lineBuffer = r0;
    L_0x0012:
        r7 = r0.length;
        r5 = 0;
    L_0x0014:
        r1 = r3.read();
        if (r1 != r10) goto L_0x0020;
    L_0x001a:
        if (r1 != r10) goto L_0x005d;
    L_0x001c:
        if (r5 != 0) goto L_0x005d;
    L_0x001e:
        r8 = 0;
    L_0x001f:
        return r8;
    L_0x0020:
        if (r1 == r11) goto L_0x001a;
    L_0x0022:
        if (r1 != r12) goto L_0x0043;
    L_0x0024:
        r2 = r3.read();
        if (r2 != r12) goto L_0x002e;
    L_0x002a:
        r2 = r3.read();
    L_0x002e:
        if (r2 == r11) goto L_0x001a;
    L_0x0030:
        r8 = r3 instanceof java.io.PushbackInputStream;
        if (r8 != 0) goto L_0x003c;
    L_0x0034:
        r4 = new java.io.PushbackInputStream;
        r4.<init>(r3);
        r13.in = r4;
        r3 = r4;
    L_0x003c:
        r8 = r3;
        r8 = (java.io.PushbackInputStream) r8;
        r8.unread(r2);
        goto L_0x001a;
    L_0x0043:
        r7 = r7 + -1;
        if (r7 >= 0) goto L_0x0056;
    L_0x0047:
        r8 = r5 + 128;
        r0 = new char[r8];
        r8 = r0.length;
        r8 = r8 - r5;
        r7 = r8 + -1;
        r8 = r13.lineBuffer;
        java.lang.System.arraycopy(r8, r9, r0, r9, r5);
        r13.lineBuffer = r0;
    L_0x0056:
        r6 = r5 + 1;
        r8 = (char) r1;
        r0[r5] = r8;
        r5 = r6;
        goto L_0x0014;
    L_0x005d:
        r8 = java.lang.String.copyValueOf(r0, r9, r5);
        goto L_0x001f;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.sun.mail.util.LineInputStream.readLine():java.lang.String");
    }
}
